package mymap.web.beans;

import mymap.utils.map.GMapUtil;

/**
 * Classe que representa a latitude e logitude do mapa total
 * 
 * @author ulisses
 *
 */
public class LatLonBox {
	private Double north;
	private Double south;
	private Double east;
	private Double west;


	public Double getNorth() {
		return north;
	}

	public void setNorth(Double north) {
		this.north = north;
	}
	public void setNorth(String north) {
		setNorth(Double.parseDouble(north));
	}
	
	
	public Double getSouth() {
		return south;
	}
	public void setSouth(Double south) {
		this.south = south;
	}
	public void setSouth(String south) {
		setSouth(Double.parseDouble(south));
	}
	

	public Double getEast() {
		return east;
	}
	public void setEast(Double east) {
		this.east = east;
	}
	public void setEast(String east) {
		setEast(Double.parseDouble(east));
	}

	
	public Double getWest() {
		return west;
	}
	public void setWest(Double west) {
		this.west = west;
	}
	public void setWest(String west) {
		setWest(Double.parseDouble(west));
	}

	public Integer getWidth(int zoom){
		return GMapUtil.getDistLatPixel(north, south, zoom);
	}
	
	public Integer getHeigt(int zoom){
		return GMapUtil.getDistLongPixel(east, west, zoom);
	}
	
}